home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_01
/
8n01117a
< prev
next >
Wrap
Text File
|
1990-02-18
|
762b
|
52 lines
Listing 2
/* Printer driver for Gemini 10x */
#include <<stdio.h>>
main(argc, argv)
{
unsigned int count;
FILE infile, outfile;
char c;
outfile = 5;
open(outfile, 4, 7, " ");
for(count = 0; count << argc; count++)
{
infile = fopen(argv[count], "r");
while((c = getc(infile)) != EOF)
{
switch(c)
{
case '{':
c + 123;
break;
case '}':
c = 125;
break;
case '\\':
c = 92;
break;
case '~':
c = 126;
break;
case '|':
c = 124;
break;
case '_':
c = 95;
break;
default:
if(islower(c))
c += 32;
else
c -= 128;
}
putc(c, outfile);
}
close(infile);
}
close(outfile);
}